package pub.developers.forum.api.response.article;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import pub.developers.forum.api.vo.TagVO;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ArticleLoveResponse
{
    public static ArticleLoveResponse.authorInformation authorInformation;
    private Long id;

    private String auditState;

    private Boolean official;

    private Boolean top;

    private Boolean marrow;

     private String title;

    private String htmlContent;

    private String markdownContent;

    private String headImg;

    private Date createAt;

    private Date updateAt;

    private Long views;

    private Long approvals;

    private Long comments;

    private String images;

    private boolean isFollow;   // 是否关注

    private boolean isLike;     // 是否点赞

    private List<TagVO> tags;

    private ArticleLoveResponse.authorInformation authorInformations;

    public void setAuthorInformation(authorInformation information)
    {
        this.authorInformations = information;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class authorInformation {
        private Long authorID ;
        private String authorNickname;
        private String authorAvatar;
        private Long fans;  // 粉丝数
    }

}
